#!/bin/bash 
source /opt/ros/melodic/setup.bash
source /home/argo/catkin_ws/devel/setup.bash

rosnode kill /lslidar_driver_node &
sleep 2
rosservice call /lio_sam_6axis/save_map > /dev/null 2>&1 &
sleep 10
cp /home/argo/catkin_ws/src/Argo_SLAM/LIO-SAM-6AXIS/data/hkust_campus/globalmap_lidar_feature.pcd /home/argo/catkin_ws/pcd/$1.pcd
sleep 5
roslaunch lslidar_driver lslidar_c16.launch > /dev/null 2>&1 & 
sleep 2
echo "ok"
exit 0




